<!DOCTYPE html>
<html lang="es">
	{config_load file=lng.conf section="strings" scope="global"}
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>{#report#}: {$report_name} @ {$settings.name}</title>
		<link rel="stylesheet" type="text/css" href="./templates/planeacion_desarrollo/css/style_print_pdf.css" />
		<link rel="stylesheet" type="text/css" href="./include/jquery-ui/css/blitzer/jquery-ui-1.10.1.custom.min.css" />
	</head>
	
	<body>
		
		<div id="report">
			
			<div id="report-head">
				<img src="templates/planeacion_desarrollo/images/actitud_logo_base.png" title="Logotipo" alt="Logotipo">
				<span>{$report_name}</span>
			</div>
			
			<div id="report-content">
				
				<h3>{#projects#}</h3>
				
				{foreach key=key item=project from=$report}
				<div class="report-item ui-corner-all">
					
					<div class="project-title">{$project.name}</div>
					<div class="project-desc">{$project.desc|strip_tags}</div>
					<div class="project-percentage">{#completed#}: <strong>{$project.done}%</strong></div>
					<div class="project-budget">{#budget#}: <strong>{$project.budget}</strong></div>
					<div class="project-datstart">{#start#}: <strong>{$project.startstring}</strong></div>
					<div class="project-datend">{#end#}: <strong>{$project.endstring}</strong></div>
					
					{if $project.companies}
					<div class="project-companies">
						{#companies_involved#}:
						{foreach key=ck item=company from=$project.companies}{if $ck != 0}, {/if}<strong>{$company.name}</strong>{/foreach}.
					</div>
					{/if}
					
					<h4>{#milestones#}</h4>
					{if $project.milestones}
					<table>
						<thead>
							<tr>
								<th>{#name#}</th>
								<th>{#description#}</th>
								<th>{#start#}</th>
								<th>{#end#}</th>
								<th>{#daysleft#}</th>
							</tr>
						</thead>
						<tbody>
							{foreach key=mk item=milestone from=$project.milestones}
							<tr {if $milestone.ID % 2 == 0} class="zebra" {/if}>
								<td class="milestone-name">{$milestone.name}</td>
								<td class="milestone-desc">{$milestone.desc|strip_tags}</td>
								<td class="milestone-inidte">{$milestone.start|date_format:"%A, %B %e, %Y"}</td>
								<td class="milestone-endate">{$milestone.end|date_format:"%A, %B %e, %Y"}</td>
								<td class="milestone-daysleft">{$milestone.daysleft}</td>
							</tr>
							{/foreach}
						</tbody>
						
					</table>
					{else}
					<div class="no-data">
						{#no_milestones#}
					</div>
					{/if}
					
					<h4>{#tasks#}</h4>
					{if $project.tasks}
					<table>
						<thead>
							<tr>
								<th>{#tasks#}</th>
								<th>{#user#}</th>
								<th>{#end#}</th>
								<th>{#daysleft#}</th>
								<th>{#tasks_priorities_label#}</th>
							</tr>
						</thead>
						<tbody>
							{foreach key=i item=task from=$project.tasks}
							<tr class="noborderbottom{if $task.ID % 2 == 0} zebra{/if}">
								<td class="task-title">{$task.title}</td>
								<td class="task-user">{$task.user}</td>
								<td class="task-end">{$task.endstring}</td>
								<td class="task-daysleft">{$task.daysleft}</td>
								<td class="task-priority">{$task.prioritystring}</td>
							</tr>
							<tr {if $task.ID % 2 == 0}class="zebra"{/if}>
								<td colspan="5">{#description#}: {$task.text}</td>
							</tr>
							{/foreach}
						</tbody>
						
					</table>
					{else}
					<div class="no-data">
						{#no_tasks#}
					</div>
					{/if}
					
					
					{if $project_files}
					<h4>{#files#}</h4>
					{if $project.files}
					<table>
						<thead>
							<tr>
								<th>{#name#}</th>
								<th>{#description#}</th>
								<th>{#added#}</th>
								<th>{#filetype#}</th>
								<th>{#attachedby#}</th>
							</tr>
						</thead>
						<tbody>
							{foreach key=fk item=file from=$project.files}
							<tr {if $file.ID % 2 == 0} class="zebra" {/if} >
								<td class="file-name">{$file.name}</td>
								<td class="file-desc">{$file.desc|strip_tags}</td>
								<td class="file-added">{$file.added|date_format:"%A, %B %e, %Y"}</td>
								<td class="file-type">{$file.type}</td>
								<td class="file-addedby">{$file.username}</td>
							</tr>
							{/foreach}
						</tbody>
					</table>
					{else}
					<div class="no-data">
						{#no_files#}
					</div>
					{/if}
					{/if}
					
				</div>
				{/foreach}
				
			</div>
						
		</div>
		
	</body>
	
</html>